package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author WZ
 * @version 1.0
 * @date 2021/9/1 16:46
 */
@Controller
//学springBoot 上传文件 包括多文件
public class FileController {

	@PostMapping("/upload")
	@ResponseBody
	public String upload(@RequestPart MultipartFile file, @RequestPart MultipartFile[] files){

if(file.isEmpty()){
	//不为空的话保存到文件服务器，oss服务器


}

		return "success";
	}
}
